package com.chaowen.util;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Calculate {
	public static List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
	public static List<String[]> dateList = new ArrayList<String[]>();
	
	private static Map<String, Object> map;

	public static String[] getFromList (int Position) {
		return dateList.get(Position);
	}
	
	public static List<Map<String, Object>> getData() {
		return list;
	}

	public static void putData(String[] msgs) {
		for (int i = 0; i < list.size(); i++) {
			Map<String, Object> tempMap = list.get(i);
			if (tempMap.containsValue(msgs[1])) {
				return;
			}
		}
		map = new HashMap<String, Object>();
		map.put("info", msgs[1]);
		list.add(map);
		dateList.add(msgs);
	}
}
